
package org.darcy.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.darcy.entity.work.WorkFlowObject;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Schema(description = "CheckCollect: 场调，采样，收样，实验，交付，结算")
@TableName(value = "check_collect")
@Getter
@Setter
public class CheckCollect extends WorkFlowObject implements Serializable, Cloneable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "上次采样id")
	@TableField(value = "`pid`")
	private Integer pid;

	@Schema(description = "派工单id")
	@TableField(value = "`delivery_id`")
	private Integer deliveryId;

	@Schema(description = "转交人员")
	@TableField(value = "`transfer_to`")
	private Integer transferTo;

	@Schema(description = "转交备注")
	@TableField(value = "`transfer_remark`")
	private Integer transferRemark;

	@Schema(description = "合同特殊要求，来自派工单")
	@TableField(value = "`survey_contract_requirement`")
	private String surveyContractRequirement;

	@Schema(description = "采样计划是否已编制完成")
	@TableField(value = "`survey_plan`")
	private Integer surveyPlan;

	@Schema(description = "委托依据是否已编制完成")
	@TableField(value = "`survey_reason`")
	private Integer surveyReason;

	@Schema(description = "场调时间")
	@TableField(value = "`survey_time`")
	private Date surveyTime;

	@Schema(description = "场调附件（采样计划和委托依据）")
	@TableField(value = "`survey_file`")
	private String surveyFile;

	@Schema(description = "场调备注")
	@TableField(value = "`survey_remark`")
	private String surveyRemark;

	@Schema(description = "外包单位是否已联系")
	@TableField(value = "`collect_informed`")
	private Integer collectInformed;

	@Schema(description = "本次采样是否全部完成")
	@TableField(value = "`collect_finished`")
	private Integer collectFinished;

	@Schema(description = "采样时间")
	@TableField(value = "`collect_time`")
	private Date collectTime;

	@Schema(description = "采样结果")
	@TableField(value = "`collect_result`")
	private String collectResult;

	@Schema(description = "采样备注")
	@TableField(value = "`collect_remark`")
	private String collectRemark;

	@Schema(description = "本次收样是否全部完成")
	@TableField(value = "`accept_finished`")
	private Integer acceptFinished;

	@Schema(description = "收样时间")
	@TableField(value = "`accept_time`")
	private Date acceptTime;

	@Schema(description = "收样结果")
	@TableField(value = "`accept_result`")
	private String acceptResult;

	@Schema(description = "收样备注")
	@TableField(value = "`accept_remark`")
	private String acceptRemark;

	@Schema(description = "实验：报告编制人员")
	@TableField(value = "`lib_report_manager`")
	private Integer libReportManager;

	@Schema(description = "实验：报告完成时间")
	@TableField(value = "`lib_report_time`")
	private Date libReportTime;

	@Schema(description = "实验报告")
	@TableField(value = "`lib_report`")
	private String libReport;

	@Schema(description = "实验报告备注")
	@TableField(value = "`lib_remark`")
	private String libRemark;

	@Schema(description = "交付时间")
	@TableField(value = "`handover_time`")
	private Date handoverTime;

	@Schema(description = "交付：是否多次联系业主不来领取")
	@TableField(value = "`handover_unfinished`")
	private Integer handoverUnfinished;

	@Schema(description = "交付备注")
	@TableField(value = "`handover_remark`")
	private String handoverRemark;

	@Schema(description = "结算时间")
	@TableField(value = "`close_time`")
	private Date closeTime;

	@Schema(description = "结算：相关业务是否已完成")
	@TableField(value = "`close_unfinished`")
	private Integer closeUnfinished;

	@Schema(description = "办公室结算备注")
	@TableField(value = "`close_dept_remark`")
	private String closeDeptRemark;

	@Schema(description = "结算备注")
	@TableField(value = "`close_remark`")
	private String closeRemark;

	@Schema(description = "服务时间")
	@TableField(value = "`service_time`")
	private Date serviceTime;

	@Schema(description = "服务回执单")
	@TableField(value = "`service_file`")
	private String serviceFile;

	@Schema(description = "服务备注")
	@TableField(value = "`service_remark`")
	private String serviceRemark;

	@Schema(description = "创建时间")
	@TableField(value = "`create_time`")
	private Date createTime;

	@Schema(description = "更新时间")
	@TableField(value = "`update_time`")
	private Date updateTime;

	@Schema(description = "删除标识0：删除；1：存在")
	@TableField(value = "`del_flag`")
	private Integer delFlag;

	// 扩展属性
	// @Schema(description = "派工单信息")
	@TableField(exist = false)
	private CheckDelivery delivery;

	@Schema(description = "业务类型")
	@TableField(exist = false)
	private String formType;

	@Schema(description = "实验分析")
	@TableField(exist = false)
	private List<CheckLibAnalysis> libAnalysisList;

	@Schema(description = "实验进度")
	@TableField(exist = false)
	private String libProgress;
	
	@Schema(description = "实验分析是否完成")
	@TableField(exist = false)
	private Boolean libFinished;

	// @Schema(description = "采样列表(本次未完成，后续产生的采样)")
	@TableField(exist = false)
	private List<CheckCollect> collectList;

	@Schema(description = "是否多次采样")
	@TableField(exist = false)
	private Boolean multiple;

	@Schema(description = "采样结果")
	@TableField(exist = false)
	private List<String> collectResultList;

	@Schema(description = "实验报告")
	@TableField(exist = false)
	private List<String> libReportList;

	@Override
	public CheckCollect clone() {
		CheckCollect data = null;
		try {
			data = (CheckCollect) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return data;
	}

}
